.header {
  padding: 8px 16px 4px;
  font-weight: bold;
  font-size: 22px;
  text-align: left;
}

.widget-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-auto-rows: minmax(160px, auto);
  grid-auto-columns: 160px;
  gap: 8px;
  align-content: space-evenly;
  align-items: stretch;
  justify-content: space-evenly;

  margin: 16px;
}

.widget-wrapper {
  position: relative;
  height: 160px;

  &.medium {
    grid-column-start: span 2;
  }

  &.large {
    grid-row-start: span 2;
    grid-column-start: span 2;
    height: 328px;
  }

  &.add {
    box-sizing: border-box;
    padding: 16px;
  }
}

.add-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  height: 130px;
  border-radius: 16px;

  background-color: var(--bg-block);
  box-shadow: 1px 1px 2px 3px var(--soft-shadow);

  font-size: 18px;
}

.add-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  opacity: 0.75;
}

.remove-button {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 100;

  width: 24px;
  height: 24px;
  border-radius: 50%;

  &::before {
    content: " ";

    position: absolute;
    top: 10px;
    right: 6px;
    bottom: 10px;
    left: 6px;

    border-radius: 2px;

    background-color: #fff;
  }
}

.add-widget-wrapper {
  @media (min-width: 768px) {
    display: flex;
    align-items: center;
  }
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;

  @media (min-width: 768px) {
    display: block;
    flex-shrink: 0;
    overflow: scroll;
    width: 200px;
  }
}

.category {
  margin: 2px;
  padding: 4px 8px !important;
  border-radius: 8px;

  background-color: var(--bg-block);
  color: var(--action-color);

  font-weight: normal;
  font-size: 14px !important;
  line-height: 1 !important;

  @media (min-width: 768px) {
    display: block !important;

    padding: 12px 16px !important;

    background-color: transparent;
    color: var(--text-color);

    font-size: 18px !important;
    line-height: 1.5 !important;

    &.activate {
      background-color: var(--bg-block);
      color: var(--action-color);
    }
  }

  &.activate {
    background-color: var(--action-color);
    color: #fff;
  }
}

.add-widgets {
  @media (min-width: 768px) {
    flex: 1;
  }
}

.widgets-display {
  height: 384px;
  text-align: center;
}

.widget-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.widgets {
  display: grid;
  grid-auto-rows: 160px;
  grid-auto-columns: 160px;
}

.widget-name {
  margin: 8px 0;
  font-size: 14px;
}

.add-widget-button {
  display: block;

  width: unset !important;
  max-width: 328px;
  margin: 8px auto !important;
  border-radius: 8px;

  background-color: var(--action-color);
  color: #fff;
}

.add-widget-hover {
  opacity: 0.7;
}

.empty-hint {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 384px;

  color: var(--dark-grey);

  font-size: 14px;

  @media (min-width: 768px) {
    flex: 1;
  }
}
